package edu.gyc.hishiro.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @RequestMapping({"/"})
    public String index() {
        return "login";
    }
    @RequestMapping({"/index"})
    public String hi() {
        return "index";
    }
    @RequestMapping({"/reg"})
    public String reg() {
        return "reg";
    }
    @RequestMapping("/userlist")
    @RequiresPermissions("userinfo:view")
    public String userinfo() {
        return "userInfo";
    }



    /**
     * 用户删除;
     * @return
     */
    @RequestMapping("/userdel")
    @RequiresPermissions("userinfo-del")//权限管理;
    public String userDel(){
        return "userInfoDel";
    }

    @RequestMapping("/emp")
   @RequiresRoles("vip")
    public String emp(){
        return "emp";
    }
}
